package fun.boomcat.luckyhe.mirai.plugin.pojo;

public class CommandMapping {
    private long qq;
    private String source;
    private String mapping;
    private String description;

    @Override
    public String toString() {
        return "CommandMapping{" +
                "qq=" + qq +
                ", source='" + source + '\'' +
                ", mapping='" + mapping + '\'' +
                ", description='" + description + '\'' +
                '}';
    }

    public long getQq() {
        return qq;
    }

    public void setQq(long qq) {
        this.qq = qq;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getMapping() {
        return mapping;
    }

    public void setMapping(String mapping) {
        this.mapping = mapping;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public CommandMapping() {
    }

    public CommandMapping(long qq, String source, String mapping, String description) {
        this.qq = qq;
        this.source = source;
        this.mapping = mapping;
        this.description = description;
    }

    public String[] getSplitSource() {
        return source.replaceAll(" +", " ").trim().split(" ");
    }

    public String[] getSplitMapping() {
        return mapping.replaceAll(" +", " ").trim().split(" ");
    }
}
